package com.tian.arch.function.adapter.core

import androidx.annotation.LayoutRes
import com.tian.arch.function.adapter.ViewHolder

/**
 * 定义数据和ViewHolder 如何绑定
 */
abstract class ViewBinder<D>(@param:LayoutRes val layoutId: Int) {

    /**
     * 绑定item的数据
     */
    abstract fun bind(holder: ViewHolder, item: D, position: Int)

}